/*
 *  Copyright 2012 yura.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package org.opu.odg.dg.question;

import java.util.ArrayList;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.ElementListUnion;
import org.simpleframework.xml.Root;

/**
 *
 * @author yura
 */
@Root(name="QuestionsScreen")
public class QuestionsScreen extends NamedObject {

    @ElementListUnion({
        @ElementList(entry="TextQuestion", inline=true, type=TextQuestion.class, required=false),
        @ElementList(entry="CustomContentQuestion", inline=true, type=CustomContentQuestion.class, required=false)
        // add custom questions here 
    })
    private ArrayList<Question<?>> questions = new ArrayList<Question<?>>();

    public ArrayList<Question<?>> getQuestions() {
        return questions;
    }

    public void setQuestions(ArrayList<Question<?>> questions) {
        this.questions = questions;
    }

    public void addQuestion(Question<?> question) {
        questions.add(question);
    }

}
